package uk.ljmu.qudexapps.swfspreadsheet.utilities;

import java.util.HashMap;
import java.util.Map;

public class Constants {
    public static final String UNIX_HIDDEN_ID = ".";
    public static final String MAC_HIDDEN_FOLDER = "__";
	public static final String DC_FORMAT_HEADER = "dc:format";
	public static final String DC_TITLE_HEADER = "dc:title";
	public static final String DC_CREATOR_HEADER = "dc:creator";
	public static final String DC_ID_HEADER = "dc:identifier";
	public static final String DC_DATE_HEADER = "dc:date";
	public static final String IDENTIFIER_HEADER = "PID";
	public static final String IDENTIFIER_TEMPLATE = "NS:XXXX";
	/*AMG Changed, we use Fedora Redirect DS now*/
	public static final String DS_REDIRECT = ":R";
	public static final String DS_MANAGED = ":M";
	public static final String HEADER_SEP = ":";
	public static final String DEFAULT_DS_NAME = "DATA:M";
	public static final String ORIGINAL_REFERENCE_R = "originalReference:R";
	public static final String ORIGINAL_REFERENCE_M = "originalReference:M";
	public static final String SOURCE_REFERENCE_R = "sourceReference:R";
	public static final String SOURCE_REFERENCE_M = "sourceReference:M";
	public static final String IS_ORIGINAL = "qudex:isOriginal";
	public static final String UPDATE = "qudex:updatePid";
	public static final String DELETE = "qudex:deletePid";
	public static final int Q_COLLECTIONS_SS = 0;
	public static final int Q_DOCUMENTS_SS = 1;
	public static final Map<String, String> readableNames = new HashMap<String, String>();
	public static final Map<String, String> typesMap = new HashMap<String, String>();
	/*AMG Added to control upload of big files so they are not kept in memory*/
	public static final long FILE_MAX_MEM_SIZE = 10240;
	public static final String DC_LANGUAGE_HEADER = "dc:language";
	public static final String DC_DESC_HEADER = "dc:description";
	public static final String DC_SUBJ_HEADER = "dc:subject";
	public static final String RDF_TYPE_HEADER = "rdf:type";
	public static final String DC_TYPE_HEADER = "dc:type";
	public static final String GEO_LAT_HEADER = "geo:lat";
	public static final String GEO_LONG_HEADER = "geo:long";
	public static final String GEO_LAT_LONG_HEADER = "geo:lat_long";
	public static final String DCMITYPE_COLLECTION = "http://purl.org/dc/dcmitype/Collection";
	public static final String DCMITYPE_FILE = "http://example.org/File";
	public static final String COLLECTION = "collection";
	public static final String FILE = "file";
	public static final int LIMIT_ROW_NUMBER = 1000;

	static {
	    readableNames.put("dc", "Dublin Core Vocabulary");
	    readableNames.put("rdf", "RDF Vocabulary");
	    readableNames.put("geo", "Basic Geo	(WGS84 lat/long) Voc.");
	    readableNames.put("rel", "Fedora relationships ontology");
	    readableNames.put("qudex", "QuDeX Vocabulary");
	    readableNames.put("ddi2", "DDI2 Vocabulary");
	    readableNames.put("skos", "Skos Vocabulary");
	}
	//USE QUDEX VALIDATORS TO EXTRACT METADATA ELEMENTS?
	//HashMap for mimetype and DCMITYPE elements, not qualified, e.g. Collection vs. http://purl.org/dc/dcmitype/Collection
	static {
		typesMap.put("http://purl.org/dc/dcmitype/Collection", "Collection");
		typesMap.put("collection", "http://purl.org/dc/dcmitype/Collection");
		typesMap.put("file", "http://example.org/File");
		typesMap.put("http://example.org/File", "file");
		typesMap.put("application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text");
		typesMap.put("application/rtf", "text");
		typesMap.put("text/plain", "text");
		typesMap.put("application/pdf", "text");
		typesMap.put("application/vnd.ms-word", "text");
		typesMap.put("text/html", "text");
		typesMap.put("application/msword", "text");
		typesMap.put("image/bmp", "image");
		typesMap.put("image/gif", "image");
		typesMap.put("image/jpeg", "image");
		typesMap.put("image/png", "image");
		typesMap.put("image/svg+xml", "image");
		typesMap.put("image/tiff", "image");
		typesMap.put("application/x-shockwave-flash", "video");
		typesMap.put("video/x-flv", "video");
		typesMap.put("video/mp4", "video");
		typesMap.put("video/mpeg", "video");
		typesMap.put("video/quicktime", "video");
		typesMap.put("video/x-msvideo", "video");
		typesMap.put("video/x-ms-wmv", "video");
		typesMap.put("audio/mpeg", "audio");
		typesMap.put("audio/x-aiff", "audio");
		typesMap.put("audio/x-wav", "audio");
		typesMap.put("application/vnd.ms-excel", "dataset");
		typesMap.put("application/msexcel", "dataset");
		typesMap.put("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "dataset");
		typesMap.put("application/vnd.openxmlformats-officedocument.presentationml.presentation", "presentation");
		typesMap.put("application/vnd.ms-powerpoint", "presentation");
	}
	
	/*DCMI_ELEMENTS.put("collection", "http://purl.org/dc/dcmitype/Collection");
		DCMI_ELEMENTS.put("dataset", "http://purl.org/dc/dcmitype/Dataset");
		DCMI_ELEMENTS.put("event", "	http://purl.org/dc/dcmitype/Event");
		DCMI_ELEMENTS.put("image", "http://purl.org/dc/dcmitype/Image");
		DCMI_ELEMENTS.put("interactiveResource", "http://purl.org/dc/dcmitype/InteractiveResource");
		DCMI_ELEMENTS.put("movingimage", "http://purl.org/dc/dcmitype/MovingImage");
		DCMI_ELEMENTS.put("physicalobject", "	http://purl.org/dc/dcmitype/PhysicalObject");
		DCMI_ELEMENTS.put("service", "	http://purl.org/dc/dcmitype/Service");
		DCMI_ELEMENTS.put("software", "http://purl.org/dc/dcmitype/Software");
		DCMI_ELEMENTS.put("sound", "	http://purl.org/dc/dcmitype/Sound");
		DCMI_ELEMENTS.put("stillimage", "http://purl.org/dc/dcmitype/StillImage");
		DCMI_ELEMENTS.put("text", "	http://purl.org/dc/dcmitype/Text");
	 * */
}
